package com.yingda.electronicscaleadvices.activity.screen;

import android.os.Bundle;
import android.os.Message;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.alibaba.fastjson.JSON;
import com.hjq.toast.ToastUtils;
import com.yingda.electronicscaleadvices.R;
import com.yingda.electronicscaleadvices.eventbus.EventBus;
import com.yingda.electronicscaleadvices.manege.BaseActivity;
import com.yingda.electronicscaleadvices.net.Common;

import butterknife.BindView;
import butterknife.ButterKnife;


public class ConfirmOutboundActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.iv_detail_close)
    ImageView iv_detail_close;

    @BindView(R.id.rv_order_goods)
    RecyclerView rv_order_goods;

    public static final String TAG = "OrderStaileActivity";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_order_staile);

        ButterKnife.bind(this);
        initData();
        addActivity(this);
        initListener();
        EventBus.getDefault().register(this);
    }

    private void initListener() {
        iv_detail_close.setOnClickListener(this);
    }


    private void initData() {


    }

    @Override
    protected void handleActMessage(Message msg) {
        super.handleActMessage(msg);
        switch (msg.what) {
            case Common.Interface_err:
                String info = (String) msg.obj;
                ToastUtils.show(info);
                break;

            case Common.Interface_success:


                //  EventBus.getDefault().post(pos, Constants.FLUSH_ORDER_DATE);
                break;
        }

    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        removeActivity(this);
        EventBus.getDefault().unregister(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_detail_close:
                finish();
                break;

        }
    }
}
